package com.zb.springcloud.service.impl;

import com.zb.springcloud.dao.AccountDao;
import com.zb.springcloud.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

@Service
@Slf4j
public class AccountServiceImpl implements AccountService {
@Resource
    AccountDao accountDao;
    @Override
    public void decrease(Long userId, BigDecimal money) {
        int a =10/0;
        System.out.println(a);

        log.info("---------->account-service中减金额开始");
        accountDao.decrease(userId, money);
        log.info("---------->account-service中减金额结束");
    }
}
